home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9076 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  899 b 

  1. Path: hades.polsl.gliwice.pl!piotras
  2. From: piotras@zeus.polsl.gliwice.pl (Piotr Auksztulewicz)
  3. Newsgroups: comp.unix.programmer,comp.lang.c++
  4. Subject: Re: [Q] Useing files as semaphores.
  5. Followup-To: comp.unix.programmer,comp.lang.c++
  6. Date: 28 Feb 1996 13:33:32 GMT
  7. Organization: Politechnika Slaska w Gliwicach    
  8. Message-ID: <4h1ljc$99i@hades.polsl.gliwice.pl>
  9. References: <3131E6AC.5925@kihdata.kih.no>
  10. NNTP-Posting-Host: zeus.polsl.gliwice.pl
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Vegard Bakke (vegard3@kihdata.kih.no) wrote:
  14. > I'm programming C++ on HP-UX 9.05 useing the compiler CC.
  15. > I have a synchornice problem that would do best without any 
  16. > deamons.
  17.  
  18. > Is ofstream::open(FileName,ios::noreplace) an atomic action?
  19.  
  20. Probably not. The only 100% sure way is to use System V semaphores
  21. or using open(filename, O_CREAT | O_EXCL, mode)
  22. The latter is guaranteed to be atomic in POSIX standard.
  23.  
  24.